package net.huashitong.Project.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;

import net.huashitong.Project.dao.NodeLogDao;
import net.huashitong.Project.entity.NodeLog;

@Service
public class NodeLogService extends StringPKService<NodeLog> {

	@Autowired
	private SysTableService tableService;
	@Autowired
	private NodeLogDao dao;
	@Override
	protected BaseDao<NodeLog, String> getDao() {
		// TODO Auto-generated method stub
		return dao;
	}
	@Override
	protected void beforeSave(NodeLog obj) {
		obj.setSysId(tableService.updateMaxSysId("t_bnp_node_log", null));
	}
	public List<NodeLog> query(String projectId,String nodeId){
		return dao.query(projectId, nodeId);
	}

}
